package Ctr;

import DB.StudentDB;
import Model.Student;

public class StudentCtr implements StudentCtrIF {

    @Override
    public Student studentLogin(String userName, String password) {
        StudentDB studentDB = new StudentDB();
        Student student = studentDB.findStudent(userName, password);

        if (student == null) {
            throw new NullPointerException();
        }
        else {
            return student;
        }
    }


}
